<html data-dpr="2" style="font-size: 20px;"><head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <link rel="stylesheet" href="/Static/mobile/login/style.css">
    <link rel="stylesheet" type="text/css" href="/Static/mobile/login/iconfont.css">
</head>
<body class="">
<style>
     body{
        background:#fff;
    }
    #verify_code_img{
        padding: .55467rem .21333rem;
        width: 4.6rem;
        height: 2.9rem;
        color: white;
        border-radius: .128rem;
        z-index: 9999999;
    }
    .ffx{
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background:rgba(0,0,0,0.5);
        padding: 0 4%;
    }
    #article{
        margin: 15px auto 0;
        background: #FFFFFF ;
        padding:10px 10px 40px;
        border-radius:6px;
        font-size: 12px;
        max-height:96%;
        overflow-y: auto;
        line-height: 30px;
        box-shadow:1px 1px 3px #fbfbfb;
    }
    .btn {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background-image: none;
    border: 1px solid #46b8da;
    border-radius: 4px;
    color: #fff;
    background-color: #5bc0de;

}
.btn-default {
    color: #888;
    background-color: #fff;
    border-color: #ccc;
}
.btn-danger {
    color: #fff;
    background-color: #d9534f;
    border-color: #d43f3a;
}
.bbt{width: 76%;height:36px;margin:0 auto;}
.bbt .btn{margin-right: 15px;float:left;}
.bbt .b2{margin-right:0;}
</style>
<div style="height: auto;padding-top:0;" class="logo-wrap-bg">
    <a style="height:auto;" class="login-logo-wrap" href="#">
        <img style="width:100%" src="<?php echo C('UPYUN_DOMAIN').C('SITE_LOGINADS')?>" alt="LOGO">
    </a>
</div>
<div class="loginsingup-input">
    <form action="" method="post" id="form">
        <input type="hidden" name="code_id" id="code_id" value="">
        <div class="lsu">
            <span class="ico ico-telephone"></span>
            <input type="text" id="mobile" name="mobile" value=""  placeholder="请输入手机号" class="c-form-txt-normal">
            <span id="mobile_phone_notice"></span>
        </div>
        <div class="lsu">
            <span class="ico ico-password"></span>
            <input type="password" name="password"  value="" placeholder="请设置6-20位登录密码" class="c-form-txt-normal">
            <span id="password_notice"></span>
        </div>
<!--        <div class="lsu">
            <span class="ico ico-password"></span>
            <input type="password"  name="password2" value="" placeholder="确认密码">
            <span id="confirm_password_notice"></span>
        </div>-->
        <div class="lsu">
            <span class="ico ico-v-code"></span>
            <input class="v-code-input" type="text"  value="" name="smscode" placeholder="请输入验证码">
            <a class="btn-text-message" rel="mobile" id="getcode" onclick="settime()">获取验证码</a>
        </div>

        <div class="lsu-submit">
            <input type="button" name="" id="" onclick="AjaxFormSubmit()" value="确认重置密码">
        </div>
        <div class="signup-find">
            <input type="hidden" name="regagree" id="regagree" value="1">
        </div>
    </form>
</div>
</body>
</html>

<script>
    
var countdown=60; 

function settime() {
    
    mobilecode = document.getElementById("getcode");
    if (countdown == 0){ 
    	mobilecode.innerHTML="获取验证码"; 
    	mobilecode.removeAttribute("disabled");
        countdown = 60; 
        return;
    }else {
    	if(countdown == 60){
            var mobile = $("#mobile").val();
            if(mobile == ''){
                    showerror("请输入手机号");
                    return false;
            }
            if(!isMobile(mobile)){
                    showerror("请检查手机号是否正确");
                    return false;
            }
            //发送短信
            sres = sendSMS(mobile);
            //sres = 1;
            if(!sres){
                    //发送失败
                    return false;
            }
    	}
    	mobilecode.setAttribute("disabled", true); 
    	mobilecode.innerHTML="重新发送(" + countdown + ")"; 
        countdown--; 
    }
    
    setTimeout(function() { settime() },1000);
}


function sendSMS(mobile){
       
	var url = "/mobile/login/sendsms?mobile="+mobile;
	var result = false;  
	$.ajax({
            url : url,
            type : 'GET',
            dataType : 'json',
            async: false, //关闭异步
            success : function(data) {
                if(data.ret == 0){
                    $("#code_id").val(data.data);
                    showsuccess("已发送");
                    result = true;
                }else{
                    showerror(data.msg);
                    result = false;
                }
        },
       error: function() {
    	   showerror("网络错误");
    	   result = false;
       }
        });
	return result;//注意必须在ajax之外返回, 在ajax里面无法正常返回
	//http://blog.csdn.net/fairyhawk/article/details/8136986
}
    var width = window.innerWidth;
    var rem = width/16;
    console.log(rem);
    $('html').attr('style',"font-size:"+rem+"px");

<?php if(get('new')) { ?>
     showerror('现在为初始密码,为了资金安全，请先修改密码');   
<?php } ?>
</script>